#include <REGX52.H>
#include <INTRINS.H>
//void Delay500us()		//@12.000MHz
//{
//	unsigned char i;

//	_nop_();
//	i = 247;
//	while (--i);
//}
void Delay1ms(int x)		//@12.000MHz
{
	unsigned char i, j;
	while(x)
	{
			i = 12;
	j = 169;
	do
	{
		while (--j);
	} while (--i);
	x--;
	}

}


void main()
{
	
	while(1)
	{
		if(P3_1==0)
		{
			Delay1ms(20);
			while(P3_1==0);
			Delay1ms(20);
			P2_0=~P2_0;
		}
	}
}
